# -*- coding: utf-8 -*-

from wxgame import db
from . import ts_func


class Setting(db.Model):
    __tablename__ = 'setting'

    id = db.Column(db.Integer, primary_key=True)
    game_timeout = db.Column(db.Integer)
    deduction = db.Column(db.Integer)
    game_start_img = db.Column(db.String(512))
    wager_stop_image = db.Column(db.String(512))
    target_id = db.Column(db.String(32), db.ForeignKey('room.id'), nullable=True)
    status = db.Column(db.Integer, nullable=False, default=1)
    create_time = db.Column(db.Integer, nullable=False, default=ts_func)
